package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.EaProductProcurementMapper;
import com.ruoyi.system.domain.EaProductProcurement;
import com.ruoyi.system.service.IEaProductProcurementService;

/**
 * 集采品种目录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-22
 */
@Service
public class EaProductProcurementServiceImpl implements IEaProductProcurementService 
{
    @Autowired
    private EaProductProcurementMapper eaProductProcurementMapper;

    /**
     * 查询集采品种目录
     * 
     * @param id 集采品种目录主键
     * @return 集采品种目录
     */
    @Override
    public EaProductProcurement selectEaProductProcurementById(Integer id)
    {
        return eaProductProcurementMapper.selectEaProductProcurementById(id);
    }

    /**
     * 查询集采品种目录列表
     * 
     * @param eaProductProcurement 集采品种目录
     * @return 集采品种目录
     */
    @Override
    public List<EaProductProcurement> selectEaProductProcurementList(EaProductProcurement eaProductProcurement)
    {
        return eaProductProcurementMapper.selectEaProductProcurementList(eaProductProcurement);
    }

    /**
     * 新增集采品种目录
     * 
     * @param eaProductProcurement 集采品种目录
     * @return 结果
     */
    @Override
    public int insertEaProductProcurement(EaProductProcurement eaProductProcurement)
    {
        eaProductProcurement.setCreateTime(DateUtils.getNowDate());
        return eaProductProcurementMapper.insertEaProductProcurement(eaProductProcurement);
    }

    /**
     * 修改集采品种目录
     * 
     * @param eaProductProcurement 集采品种目录
     * @return 结果
     */
    @Override
    public int updateEaProductProcurement(EaProductProcurement eaProductProcurement)
    {
        eaProductProcurement.setUpdateTime(DateUtils.getNowDate());
        return eaProductProcurementMapper.updateEaProductProcurement(eaProductProcurement);
    }

    /**
     * 批量删除集采品种目录
     * 
     * @param ids 需要删除的集采品种目录主键
     * @return 结果
     */
    @Override
    public int deleteEaProductProcurementByIds(Integer[] ids)
    {
        return eaProductProcurementMapper.deleteEaProductProcurementByIds(ids);
    }

    /**
     * 删除集采品种目录信息
     * 
     * @param id 集采品种目录主键
     * @return 结果
     */
    @Override
    public int deleteEaProductProcurementById(Integer id)
    {
        return eaProductProcurementMapper.deleteEaProductProcurementById(id);
    }
}
